hvm: Fix TPMD and QEMU connection
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 20 Dec 2007 10:43:06 +0000 (10:43 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 20 Dec 2007 10:43:06 +0000 (10:43 +0000)
In HVM domain, MA_Transmit function in tcgbios sometimes become an
error (TCG_NO_RESPONSE). The cause of the error is not to make
connection of QEMU and TPMD instance within a timeout of MA_Transmit
function.

Before the MA_Transmit function was called, the attached patch
corrected so that connection of QEMU and TPMD might be completed.

Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
tools/ioemu/hw/tpm_tis.c

index c40a33e677b1714f5023e41a4aa40196d8000198..3c679218222d533435a1ca333c0ace11c38c8501 100644 (file)
@@ -904,6 +904,11 @@ void tpm_tis_init(SetIRQFunc *set_irq, void *opaque, int irq)
     memset(s->buffer.buf,0,sizeof(s->buffer.buf));
 
     register_savevm("tpm-tis", 0, 1, tpm_save, tpm_load, s);
+
+    for (c = 0; !IS_COMM_WITH_VTPM(s) && (c < 5); c++) {
+       open_vtpm_channel(s);
+       sleep(1);
+    }
 }
 
 /****************************************************************************/